//弹窗信息内容
import React from 'react';
import { connect } from 'dva';
import moment from 'moment';
import { FormGroup, DATA_ENTRY, codeType } from '../../../../comps';
import { formSelectData } from '../../../../utils/utils';
class MyModal extends React.Component {
  constructor() {
    super();
    this.state = {};
  }
  componentDidMount() {
    this.props.onRef(this);
  }
  getInfo = () => {
    let values = this.state.myFormRef?.getFormGroupData();
    return values;
  };
  render() {
    const { detailData } = this.props;
    return (
      <div>
        <FormGroup
          onRef={(ref) => (this.state.myFormRef = ref)}
          resultIncludeNull={true}
          widthSet={790}
          dataSource={[
            {
              dataIndex: 'insidecode',
              title: '内部编码',
              type: DATA_ENTRY.INPUT,
              initialValue: detailData?.insidecode,
              disabled: false,
              span: 12,
              rules: [{ required: true, message: '请输入内部编码!' }],
            },
            {
              dataIndex: 'productName',
              title: '产品名称',
              type: DATA_ENTRY.INPUT,
              initialValue: detailData?.productName,
              disabled: false,
              span: 12,
              rules: [{ required: true, message: '请输入产品名称!' }],
            },
            {
              dataIndex: 'bankProductCode',
              title: '人行产品代码',
              type: DATA_ENTRY.INPUT,
              initialValue: detailData?.bankProductCode,
              disabled: false,
              span: 12,
              rules: [{ required: true, message: '请输入人行产品代码!' }],
            },
            {
              dataIndex: 'bankAssetCode',
              title: '人行资产池代码',
              type: DATA_ENTRY.INPUT,
              initialValue: detailData?.bankAssetCode,
              disabled: false,
              span: 12,
              rules: [{ required: true, message: '请输入人行资产池代码!' }],
            },
          ]}
          autoLayout={false}
        ></FormGroup>
      </div>
    );
  }
}
export default MyModal;
